﻿using AutoMapper;
using BCDto.Common.IP;
using BCDto.Website.User;
using BCDto.Website.UserAddress;
using BCDto.Website.UserAuth;
using BCEntity.Common.IP;
using BCEntity.Website.User;
using BCEntity.Website.UserAddress;

namespace BCService.MapperProfiles.Website.User
{
    public class UserProfile : Profile
    {
        public UserProfile()
        {
            CreateMap<UserEntity, UserDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserDto, UserEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserSimPutDto, UserEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserRequestDto, UserEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            //信息
            CreateMap<UserAuthDto, UserAuthEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserAuthRequestDto, UserAuthPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserAuthRequestDto, UserAuthEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserAuthPutDto, UserAuthEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserAuthEntity, UserAuthDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            //用户地址
            CreateMap<UserAddressDto, UserAddressEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserAddressRequestDto, UserAddressPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserAddressRequestDto, UserAddressEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserAddressPutDto, UserAddressEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<UserAddressEntity, UserAddressDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<IPAddressRecordEntity, IPAddressRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<IPAddressRecordDto, IPAddressRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}
